package com.shop.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 商品
 */
@Data
@TableName("goods")
@ApiModel("Goods对象")
public class Goods implements Serializable {
    @TableId(value = "goods_id",type = IdType.AUTO)
    @ApiModelProperty(value = "商品id",required = true,example = "0")
    private Integer id;//商品编码主键

    @TableField("goods_name")
    @ApiModelProperty("商品名称")
    private String name;//商品名称

    @TableField("goods_price")
    @ApiModelProperty("商品价格")
    private Float price;//价格

    @TableField("goods_number")
    @ApiModelProperty("商品销量")
    private Integer number;//销量

    @TableField("picture")
    @ApiModelProperty("商品图片")
    private String picture;//图片

    @TableField("goods_kind")
    @ApiModelProperty("商品种类id")
    private Integer kind;//商品分类

    @TableField(exist = false)
    @ApiModelProperty("商品种类名称")
    private String kindsName;

}
